var assert = require('assert');
const MarioChar1 = require('../test/shema');



describe ('delete rec test',function(){
    var char1;
    beforeEach(function(done){
      char1 = new MarioChar1({
        name:'Mario',
        speed:'20',

      });
      char1.save().then(function(){
        console.log('++++++++');
        console.log(char1);
        console.log('--------')

         assert(char1.isNew === false);
         done();

      });

    });



    it('delete one rec ',function(done){
      MarioChar1.findOneAndRemove({name:'Mario'}).then(function(d){
        MarioChar1.findOne({name:'Mario'}).then(function(d){
        console.log(d);
        assert(d === null);
        done();})

      })

    });





});
